package com.polaris.live.adapter

import com.polaris.live.R
import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterWeekCallBinding
import com.polaris.live.im.sfs.bean.live.ext.UserBasicVo
import com.polaris.live.widget.avatar.FrameImageUtils

/**
 * WeekCallSettingAdapter
 *
 * @author Created by 天晴 on 2024/5/13/004 12:03
 */
class WeekCallSettingAdapter : BaseBindingAdapter<AdapterWeekCallBinding, UserBasicVo>() {

    init {
        addChildClickViewIds(R.id.allow_btn, R.id.block_item_head)
    }

    override fun convert(holder: VBViewHolder<AdapterWeekCallBinding>, item: UserBasicVo) {
        holder.vb.apply {
            blockItemHead.setImageUrl(item.avatar)
            blockItemNickName.text = item.nickname
            avFv.setFrameImage(FrameImageUtils.urlToFrameImageBean(item.avatarFrame))
        }
    }

}